-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Java] Package native dependencies into jar #4367
Conversation
Could this PR solve the problem of building Arrow using bazel in #4284 ? So we can pre-build arrow and put all the binaries to a jar file like the python wheel and during building of ray, we need only to download the jar file, right? |
@guoyuhong yeah, we can do that. |
Test FAILed. |
Test FAILed. |
Test FAILed. |
/** | ||
* Copy a file from resources to a temp dir, and return the file object. | ||
*/ | ||
private File getTempFile(String fileName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to declare this as a static method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-static should be fine. there's only one RunManager
instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
try { | ||
// Reset library path at runtime. | ||
resetLibraryPath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this function to set java.library.path
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, because users may pass in custom library path.
What do these changes do?
Package Java binary dependencies into the jar file, so the runtime won't depend on any relative paths. This change would make it easier to support maven and bazel simultaneously (#4284, cc @alegithub111 ).
Later, we can also build and distribute jars for mainstream platforms (just like the python wheels), so users don't need to compile the code by themselves.
Related issue number